#include "smart_car.h"



void Smart_car::setID(string _id)
{
    id=_id;
}


void Smart_car::print ()
{
    cout<<"智能小车"<<endl<<"编号："<<id<<endl;
    chassis.print();
    agx.print();
    binocular_camera.print();
    multi_line_lidar.print();
    gyroscope_9axis.print();
    lcd_isplay_screen.print();
    battery_module.print();
}


void Smart_car::save (string path)
{
    ofstream ofs;// 创建流对象
    ofs.open(path, ios::out | ios::app);
    ofs<<"智能小车"<<endl<<"编号："<<id<<endl;
    ofs.close();

    chassis.save(path);
    agx.save(path);
    binocular_camera.save(path);
    multi_line_lidar.save(path);
    gyroscope_9axis.save(path);
    lcd_isplay_screen.save(path);
    battery_module.save(path);
}



void Smart_car::setChassis(Chassis _chassis)
{
    chassis=_chassis;
}


void Smart_car::setAgx(Agx _agx)
{
    agx=_agx;
}

void Smart_car::setBinocular_camera(Binocular_camera _binocular_camera)
{
    binocular_camera=_binocular_camera;
}

void Smart_car::setMulti_line_lidar(Multi_line_lidar _multi_line_lidar)
{
    multi_line_lidar=_multi_line_lidar;
}

void Smart_car::setGyroscope_9axis(Gyroscope_9axis _gyroscope_9axis)
{
    gyroscope_9axis=_gyroscope_9axis;
}

void Smart_car::setLcd_isplay_screen(Lcd_isplay_screen _lcd_isplay_screen)
{
    lcd_isplay_screen=_lcd_isplay_screen;
}

void Smart_car::seBattery_module(Battery_module _battery_module)
{
    battery_module=_battery_module;
}
